package com.igroupes.ovineherd.util;

import java.util.HashMap;
import java.util.Map;

public enum MagicNumberCheck {
    ;

    private static final String CACHE = "F0001G";
    private static final  Map<CheckType,String> M_A_P =new HashMap<>();

    static {
        M_A_P.put(CheckType.Cache, CACHE);
    }

    public static void check(CheckType checkType , String code){
        Requires.requireNonBlank(code, "check magic number is blank");
        Requires.requireNonNull(checkType , "check type is null");
        if(!code.equals(M_A_P.get(checkType))){
            throw new IllegalStateException();
        }
    }

    public enum CheckType{
        Cache;
    }
}
